package com.qiaofang.applet.service.member.service.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;
import java.util.List;

@Data
@ApiModel("经纪人详情DTO")
public class EmployeeDetailDto {

    @ApiModelProperty("id")
    private String id;

    @ApiModelProperty("经纪人UUID")
    private String employeeUniqueUuid;

    @ApiModelProperty("姓名")
    private String employeeName;

    @ApiModelProperty("部门UUID")
    private String deptUuid;

    @ApiModelProperty("部门名称")
    private String deptName;

    @ApiModelProperty("经纪人照片")
    private String employeePhotoUrl;

    @ApiModelProperty("职务名称")
    private String positionName;

    @ApiModelProperty("性别 男/女")
    private String gender;

    @ApiModelProperty("手机")
    private String mobilePhone;

    @ApiModelProperty("经纪人状态 区分离职与其他状态")
    private String employeeStatus;

    @ApiModelProperty("主推 true主推  false不主推")
    private Boolean recommend;

    @ApiModelProperty("推荐语")
    private String recommendDescribe;

    @ApiModelProperty("城市编码")
    private String cityCode;

    @ApiModelProperty("城市名称")
    private String cityName;

    @ApiModelProperty(value = "是否主推：是/否，admin系统使用", hidden = true)
    private String recommendStr;

    @ApiModelProperty("经纪人标签")
    private List<String> labelUuidList;

    public String getRecommendStr() {
        return recommend != null && recommend ? "是" : "否";
    }

    public String getRecommendDescribe(){
        if (StringUtils.isBlank(recommendDescribe)){
            return "专业为您挑选好房";
        }
        return recommendDescribe;
    }
}
